package com.way.demo.comm2;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author lipingwei
 * @create 2021-02-09 14:29
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = -7640861510028405096L;
    private String code;
    private String message;
    private Object[] args;
    private IResponseEnum responseEnum;

    public BaseException(IResponseEnum responseEnum, Object[] args, String message) {
        super(message);
        this.responseEnum=responseEnum;
        this.message=message;
        this.args=args;
    }

    public BaseException(IResponseEnum responseEnum, Object[] args, String message, Throwable cause) {
        super(message,cause);
        this.responseEnum=responseEnum;
        this.message=message;
        this.args=args;
    }
}
